//
//  HBActivityCell.m
//  HuoBao
//
//  Created by sky on 15/12/9.
//  Copyright © 2015年 jinxin. All rights reserved.
//

#import "HBActivityCell.h"
#import "UIImageView+WebCache.h"

#define GetFinalResult(x,y,z,r) (IsIphone4?x:(IsIphone6P?r:(IsIphone5?y:z)))



#define IMAGEHEIGHT       GetFinalResult(170,170,200,220)

@implementation HBActivityCell{
    UIImageView *_activi;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.backgroundColor = [LCCommon getColor:@"37383d"];
        
        [self buildLayout];
    }
    return self;
}

-(void)setIteminfo:(HBGetActivityListItemInfo *)iteminfo{
    _iteminfo = iteminfo;
    [_activi setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",self.iteminfo.activityImg]] placeholderImage:[UIImage imageNamed:@"Home_activty"]];
}


-(void)buildLayout{
    _activi = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, IMAGEHEIGHT)];
    //_activi.image = [UIImage imageNamed:@"Home_activty"];
    _activi.clipsToBounds = YES;
    [self.contentView addSubview:_activi];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
